package com.javafactroy.kunlong.data.service;

import com.javafactroy.kunlong.data.dao.mysql.EmployeeApiMapper;
import com.javafactroy.kunlong.data.entity.EmployeeApiEntity;
import dto.base.com.javafactroy.kunlong.TQueryParam;
import model.base.com.javafactroy.kunlong.ReturnPageInfo;

import org.apache.ibatis.annotations.Param;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
*  @author raymond.lei@163.com
*  @date   2024-04-07 21:27:00

*/
@Slf4j
@Service
public class EmployeeService extends GeneralService<EmployeeApiEntity, EmployeeApiMapper> {

    public EmployeeService() {
        genricParam = () -> new EmployeeApiEntity();
    }

    public ReturnPageInfo<EmployeeApiEntity> queryParam(@Param("queryParam") TQueryParam<EmployeeApiEntity> queryParam) {
        if ( queryParam.getParam() == null ) {
            queryParam.setParam(new EmployeeApiEntity());
        }

        return super.queryParam(queryParam);

    }
}
